home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / batch / batout13.zip / BATOUT.DOC next >
Text File  |  1992-10-31  |  4KB  |  129 lines

  1.                           ┌────────────┐
  2.                           │ BATOUT.EXE │
  3.                           └────────────┘
  4.  
  5.                       Batch File Exit Utility
  6.                             Tom Kellen
  7.                    ßETATech Computer Consulting
  8.  
  9. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  10.  
  11. PURPOSE:  To provide a timed exit or jump within a batch file based
  12.           on a keystroke.
  13.  
  14.  
  15.  
  16. INTRODUCTION:
  17.  
  18. This little ditty runs a timer to allow you a pause to exit a batch
  19. file.  I wrote this to use on my BBS machine as it loads a device
  20. driver that disables the Ctrl/Break.  The AUTOEXEC.BAT on the BBS
  21. machine automatically loads the BBS, so what I needed was a utility
  22. that would allow me to exit the batch file before Spitfire loads.
  23. BatOut gives a delay to your batch files waiting for a key stroke.
  24. If I am not there and the machine reboots, the AUTOEXEC runs BatOut
  25. and it just times out loading the BBS.  If I am there and have
  26. rebooted the machine to do some maintenance and don't want the BBS
  27. loaded, I just hit a key and BatOut aborts the batch file.
  28.  
  29. Here is the tail end of my BBS machine's AUTOEXEC.BAT:
  30.  
  31. _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
  32. C:
  33. CD\SF
  34. CLS
  35. ECHO Should the BBS be loaded?
  36. ECHO .
  37. @BatOut 10
  38. IF ErrorLevel 1 GOTO EXIT
  39. BOOTLOG C:\SF\WORK\CALLERS.LOG
  40. SF
  41. :EXIT
  42. _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
  43.  
  44.  
  45.  
  46. INSTALLATION:
  47.  
  48. Place BATOUT.EXE in a subdirectory that is somewhere on the path.
  49. That is all there is to it.
  50.  
  51.  
  52.  
  53. OPERATION:
  54.  
  55. BatOut takes one required command line parameter, and two optional
  56. ones.  The required parameter is the number of seconds to wait.  This
  57. must be between 0 and 99.  BatOut will then display the seconds
  58. counting down.  If you do nothing the program will halt at the number
  59. of seconds you specified with an ErrorLevel of 0.  If you press the
  60. <Escape> key, BatOut will exit immediately with an ErrorLevel of 0.
  61. This effectively continues your batch file immediately.  If you press
  62. any other key, BatOut exits with an ErrorLevel of 1.  You then check
  63. for this ErrorLevel and use a GOTO statement to skip to the end of the
  64. batch file.
  65.  
  66. BatOut can also be used for branching in batch files.  If there was
  67. a command in a batch file that you only want to run occasionally, you
  68. can use BatOut to jump to a label beyond that command, just by hitting
  69. a key.
  70.  
  71. BatOut also takes 2 optional parameters.  The first one is /T.  This
  72. parameter stops BatOut from displaying the program name and copyright.
  73. Please honor the copyright, but I can understand some folks wanting
  74. a cleaner display.
  75.  
  76. The second parameter is /C.  Using /C suppresses the display of the
  77. count down timer.  BatOut still waits the designated time, but there
  78. is no display of the remaining seconds.
  79.  
  80. It's really nothing fancy, just a timer that you might find useful.
  81.  
  82. I've included a little demo batch file to show how it works.  Try
  83. doing nothing, then try it pressing any key.  Now try it pressing the
  84. <Escape> key.
  85.  
  86.  
  87.  
  88. EPILOGUE:
  89.  
  90. This is a Free utility.  I retain the copyright, but you may use it
  91. to your heart's content.  If you find this utility of use, you can
  92. drop me a note on my BBS or route me a message at RIME Node ->PARADIGM
  93. letting me know that you find it of value too.  Of course if you felt
  94. like sending .50 or a dollar, that certainly would not be turned down.
  95.  
  96.  
  97.  
  98. AUTHOR CONTACT:
  99.  
  100. Problems, solutions, kudos and ideas are welcomed.  I can be reached
  101. at the following:
  102.  
  103. The Paradigm BBS                   ßETATech Computer Consulting
  104. 404/671-1581                       P. O. Box 566742
  105. 1200-19,200 Baud 24 Hrs/Day        Atlanta, GA  31156-6013
  106.  
  107.  
  108.  
  109. DISCLAIMER:
  110.  
  111. Use of this program acknowledges this disclaimer of warranty: "This
  112. program is supplied as is.  ßETATech Computer Consulting disclaims all
  113. warranties, express or implied, including, without limitation, the
  114. warranties of merchantability and of fitness of this program for any
  115. purpose.  ßETATech Computer Consulting assumes no liability for
  116. damages direct or consequential, which may result from the use of this
  117. program."
  118.  
  119.  
  120.  
  121. REVISION HISTORY:
  122.  
  123. 15-NOV-1990    v1.0      Initial Release.
  124.  
  125. 01-DEC-1990    v1.1      Recompiled with Turbo Pascal v6.0
  126.  
  127. 10-FEB-1992    v1.2      Added /C and /T command line parameters.
  128.  
  129. 31-OCT-1992    V1.3      Code optimizations resulting in smaller .EXE